using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Xml.Serialization;
using System.IO;

namespace TPDSConfig
{

    [Serializable()]
    public class TPDSConfig
    {
        private const string configurationfile = "config.xml";

        public int BarcodeType;
        public double BarcodeConfidence;
        public int BarcodeGranularity;
        public int ExpectedDpi;
        public string ControlFilename;
        public string BarcodeOutputFileSpec;
        public string EYMBCPath;
        public string BarcodeImageFileMask;
        public string DestinationFolder;
        public string ImageMonitorRootFolder;
        public int ThumbnailMaxDimension;
        public int ProcessKillDelay;

          
        public TPDSConfig()
        { }

        public static TPDSConfig Load( string path )
        {
            return (TPDSConfig)Utils.LoadXML( Path.Combine( path, configurationfile ), typeof( TPDSConfig ) );
        }

        /// <summary>
        /// Returns absolute path to file given the location of the web server.
        /// </summary>
        public static string ConfigFilePath( string path )
        {
            return Path.Combine( path, configurationfile );
        }
    }
}
